/* 聊天记录管理页面样式 */

/* 基本样式 */
.card {
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
  border-radius: 0.75rem 0.75rem 0 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* 聊天列表样式 */
.chat-list-wrapper {
  max-height: 70vh;
  overflow-y: auto;
}

.chat-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.chat-item:hover {
  background-color: rgba(13, 110, 253, 0.05);
}

.chat-item.active {
  background-color: rgba(13, 110, 253, 0.1);
  border-left: 3px solid #0d6efd;
}

.chat-item:last-child {
  border-bottom: none;
}

.chat-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #e9ecef;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  color: #495057;
  font-size: 1.2rem;
}

.chat-avatar.group {
  background-color: #d1e7dd;
  color: #0f5132;
}

.chat-avatar.private {
  background-color: #cfe2ff;
  color: #084298;
}

.chat-name {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.25rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-message {
  font-size: 0.875rem;
  color: #6c757d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.chat-time {
  font-size: 0.75rem;
  color: #adb5bd;
}

.chat-badge {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 0.75rem;
  background-color: #0d6efd;
  color: white;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.5rem;
}

/* 聊天详情样式 */
.chat-detail-wrapper {
  max-height: 70vh;
  overflow-y: auto;
  padding: 1rem;
}

.message-bubble {
  margin-bottom: 1rem;
  max-width: 75%;
}

.message-bubble.sent {
  margin-left: auto;
  background-color: #cfe2ff;
  border-radius: 1rem 0 1rem 1rem;
}

.message-bubble.received {
  background-color: #f8f9fa;
  border-radius: 0 1rem 1rem 1rem;
}

.message-content {
  padding: 0.75rem 1rem;
  word-break: break-word;
}

.message-time {
  font-size: 0.75rem;
  color: #adb5bd;
  text-align: right;
  margin-top: 0.25rem;
}

.message-sender {
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #495057;
}

/* 消息类型样式 */
.message-text {
  white-space: pre-wrap;
}

.message-image img {
  max-width: 100%;
  border-radius: 0.5rem;
}

.message-file, .message-voice, .message-video {
  display: flex;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 0.5rem;
  padding: 0.5rem;
}

.message-file i, .message-voice i, .message-video i {
  font-size: 1.5rem;
  margin-right: 0.75rem;
}

/* 空状态样式 */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state i {
  font-size: 3rem;
  color: #dee2e6;
  margin-bottom: 1rem;
}

.empty-state p {
  color: #adb5bd;
  margin-bottom: 1rem;
}

/* 加载动画 */
.spinner-border {
  width: 2rem;
  height: 2rem;
}

/* 响应式调整 */
@media (max-width: 992px) {
  .chat-item {
    padding: 0.5rem;
  }
  
  .chat-avatar {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .chat-name {
    font-size: 0.9rem;
  }
  
  .message-bubble {
    max-width: 85%;
  }
}

@media (max-width: 768px) {
  #chatDetailPanel {
    margin-top: 1rem;
  }
  
  .chat-list-wrapper,
  .chat-detail-wrapper {
    max-height: 60vh;
  }
} 